<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>

    // - 定义常量（固定值）的，肯定不能再次定义，不能修改值。
    // const 定义就是常量，和大写小写无关，大写常量名称是规范习惯
    // const AGE = 10
    // const AGE = 20 // Identifier 'AGE' has already been declared
    // AGE = 20 // Assignment to constant variable.

    // - 定义常量的时候必须有值
    // const AGE  // Missing initializer in const declaration

    const OBJ = {name:'tom'}
    // 改值 
    OBJ.name = 'tony'
    delete OBJ.name
    OBJ.age = 10
    console.log(OBJ)
    // 赋值（修改了引用地址）
    OBJ = {} // Assignment to constant variable.

  </script>
</body>

</html>